home *** CD-ROM | disk | FTP | other *** search
- unit Ctrl3D;
-
- interface
-
- uses
- Classes, Controls, Forms, Graphics, Menus, Messages, StdCtrls, SysUtils,
- WinTypes, WinProcs, ColorBtn;
-
- type
- T3dStyle = (tsNone, tsRaised, tsRecessed, tsShadowed);
- TShadowOffset = 1..10;
-
- type
- TLabel3D = class(TCustomLabel)
- private
- F3dStyle : T3dStyle;
- FOffset : TShadowOffset;
- FShadowColor : TColor;
- FHiliteColor : TColor;
-
- function GetOffset: Integer;
- procedure SetStyle(AStyle : T3dStyle);
- procedure SetOffset(AValue : TShadowOffset);
- procedure SetShadowColor(AColor : TColor);
- procedure SetHiliteColor(AColor : TColor);
-
- protected
- procedure Paint; override;
-
- public
- constructor Create(AOwner : TComponent); override;
-
- published
- property Align;
- property Alignment;
- property AutoSize;
- property Caption;
- property Color;
- property DragCursor;
- property DragMode;
- property Enabled;
- property FocusControl;
- property Font;
- property ParentColor;
- property ParentFont;
- property ParentShowHint;
- property PopupMenu;
- property ShowAccelChar;
- property ShowHint;
- {property Transparent;}
- property Visible;
- property WordWrap;
- property OnClick;
- property OnDblClick;
- property OnDragDrop;
- property OnDragOver;
- property OnEndDrag;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
-
- property TextStyle : T3dStyle read F3dStyle write SetStyle default tsRecessed;
- property ShadowOffset : TShadowOffset read FOffset write SetOffset default 1;
- property ColorShadow : TColor read FShadowColor write SetShadowColor default clBtnShadow;
- property ColorHighlight : TColor read FHiliteColor write SetHiliteColor default clBtnHighlight;
- end;
-
-
- TButton3D = class(TColoredButton)
- private
- F3dStyle : T3dStyle;
- FOffset : TShadowOffset;
- FShadowColor : TColor;
- FHiliteColor : TColor;
-
- function GetOffset: Integer;
- procedure SetStyle(AStyle : T3dStyle);
- procedure SetOffset(AValue : TShadowOffset);
- procedure SetShadowColor(AColor : TColor);
- procedure SetHiliteColor(AColor : TColor);
-
- protected
- function DrawCaption(const ARect : TRect): TRect; override;
-
- public
- constructor Create(AOwner : TComponent); override;
-
- published
- property TextStyle : T3dStyle read F3dStyle write SetStyle default tsRecessed;
- property ShadowOffset : TShadowOffset read FOffset write SetOffset default 1;
- property ColorShadow : TColor read FShadowColor write SetShadowColor default clBtnShadow;
- property ColorHighlight : TColor read FHiliteColor write SetHiliteColor default clBtnHighlight;
- end;
-
-
- implementation
- end.